import Vue from 'vue'
import Router from 'vue-router'
import Articles from '@/components/Articles'
import ArticlesList from '@/components/ArticlesList'
import NewArticle from '@/components/NewArticle'
import TagsAndTypes from '@/components/TagsAndTypes'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect:'/Articles'
    },
    {
      path:'/Articles',
      name:'Articles',
      component:Articles,
      redirect:'/Articles/ArticlesList',
      children:[
        {
          path:'/Articles/ArticlesList',
          component:ArticlesList,
          name:'ArticlesList'
        },
        {
          path:'/Articles/NewArticle',
          component:NewArticle,
          name:'NewArticle'
        }
      ]
    },
    {
      path:'/TagsAndTypes',
      component:TagsAndTypes,
      name:'TagsAndTypes'
    }
  ]
})
